<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/academy.css">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

	$(function() {

		//初始化页面配置
		document.title = "学术交流与活动";

		var app = new Vue({
			el: '#container',
			data: {
				activityList: [],
			},
			methods: {
				activityDetail: function(id) {
                    window.location.href = "/wechat/activity/detail/id/"+id;
				},
				jump: function(url) {
					window.location.href = url;
				}
			}
		})

		function getActivityList() {

			$.ajax({
				url:"/wechat/activity/activityList",
				type:"post",
				data:{
					categoryId: 0,
					type: 4
				},
				dataType:"JSON",
				beforeSend:function(){
					$("#loadingToast").show();
				},
				complete:function(){
					$('#loadingToast').hide();
				},
				success:function(data){
					app.activityList = data;
				},
			})
		}

		getActivityList();



	});


</script>

<div class="container" id="container">
	<div class="no-data" v-if="activityList == null">暂无数据</div>
	<div class="content">
		<div class="activity-info" v-for="activity in activityList" v-on:click="activityDetail(activity.activity_id)">
			<div class="bg-img">
				<img src="{{activity.title_image}}" alt="">
			</div>
			<p class="activity-title">{{activity.title}}</p>
		</div>
	</div>
</div>
<include file="./Template/footer.html" />

